import { get, post, put, del, getWithArgs } from '../utils/xFetch2'
// import axios from 'axios'

const compAPI = {

    comps: params => {
        return getWithArgs('api/v1/comp/cond', params)
    },
    compCity: params => {
        return getWithArgs('api/v1/comp/city', params)
    },
    compDetail: id => {
        return getWithArgs(`api/v1/comp/${id}`)
    },
    compReg: params => {
        return post('api/v1/comp', params)
    },
    compsAdmin: params => {
        return getWithArgs('api/v1/admin/comp', params)
    },
    compClose: (id) => {
        return put(`api/v1/comp/${id}/close`)
    },
    compApprove: (id) => {
        return put(`api/v1/comp/${id}/approve`)
    },
}

export default compAPI
